package com.lyf.service;

import java.util.List;

import com.lyf.dao.FileDao;
import com.lyf.pojo.SingleFile;

public class FileService {

	private FileDao dao;

	//set,
	public void setDao(FileDao dao) {
		this.dao = dao;
	}
	
	//method
	public List<SingleFile> findByFolderId(String id){
		return dao.findByFolderId(id);
	}

	public void save(SingleFile file) {
		dao.saveOrUpdate(file);
	}

	public void delete(String id) {
		dao.delete(id);
	}

	public SingleFile findById(String id) {
		return dao.get(id);
	}

	public List<SingleFile> findAll() {
		return dao.findAll();
	}
	
	
}
